<template>
	<view class="content">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
			<button @click="getBanners()">banner</button>
		</view>
	</view>
</template>

<script>
	import { getBannerList } from '../../api/api.js';
	
	export default {
		data() {
			return {
				title: 'Hello'
			}
		},
		onLoad() {

		},
		methods: {
			async getBanners() {
				let banners = await getBannerList()
				console.log('首页信息banner:',banners)
				// let header = {'content-type': 'application/x-www-form-urlencoded;charset:utf-8',
							// }
				// uni.request({
				// 	url: "https://www.wanandroid.com/banner/json",
				// 	method: 'GET',
				// 	// header: header,
				// 	success: (res) => {
				// 		console.log('首页信息banner:',res)
				// 	}, fail: (error) => {
				// 		console.log('首页信息error:',error)
				// 	}
				// })
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 50rpx;
		color: #000000;
	}
</style>
